Observable

interface Observable<T : Event?>

An observable object.

An observable object can have one or more observers. Each observer is associated with a particular event class.

Parameters

<T>

the common type of the observed events

Inheritors

Functions

Link copied to clipboard
abstract fun <E : T?> on(eventClass: Class<E>, observer: Observer<E>): Subscription
Subscribes the given event observer to receive the events of the given eventClass.
Link copied to clipboard
inline fun <E : Event> Observable<in E>.subscribe(observer: Observer<E>): Subscription
inline fun <E : Event> Observable<in E>.subscribe(observer: Observer<E>): Subscription

Subscribes the given observer to receive events of type E from this Observable.